/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FROrden.java
 *
 * Created on Nov 28, 2011, 3:39:57 PM
 */

package Interfaz;

import Negocio.UI.UIPuntoVenta;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;

/**
 *
 * @author Marco
 */
public class FROrden extends javax.swing.JFrame {

    private UIPuntoVenta uiPuntoVenta = UIPuntoVenta.getInstancia();

    /** Creates new form FROrden */
    public FROrden() {
        initComponents();
    }

    public JButton getBtnAgregarOrden() {
        return btnAgregarOrden;
    }

    public void setBtnAgregarOrden(JButton btnAgregarOrden) {
        this.btnAgregarOrden = btnAgregarOrden;
    }

    public ButtonGroup getButtonGroup1() {
        return buttonGroup1;
    }

    public void setButtonGroup1(ButtonGroup buttonGroup1) {
        this.buttonGroup1 = buttonGroup1;
    }

    public JLabel getjLabel1() {
        return lblNumProducto;
    }

    public JLabel getjLabel5() {
        return jLabel5;
    }

    public void setjLabel5(JLabel jLabel5) {
        this.jLabel5 = jLabel5;
    }

    public JLabel getjLabel6() {
        return jLabel6;
    }

    public void setjLabel6(JLabel jLabel6) {
        this.jLabel6 = jLabel6;
    }

    public JPanel getjPanel1() {
        return jPanel1;
    }

    public void setjPanel1(JPanel jPanel1) {
        this.jPanel1 = jPanel1;
    }

    public JPanel getjPanel2() {
        return jPanel2;
    }

    public void setjPanel2(JPanel jPanel2) {
        this.jPanel2 = jPanel2;
    }

    public JScrollPane getjScrollPane1() {
        return jScrollPane1;
    }

    public void setjScrollPane1(JScrollPane jScrollPane1) {
        this.jScrollPane1 = jScrollPane1;
    }

    public JScrollPane getjScrollPane2() {
        return jScrollPane2;
    }

    public void setjScrollPane2(JScrollPane jScrollPane2) {
        this.jScrollPane2 = jScrollPane2;
    }

    public JList getLsBailarinasOrden() {
        return lsBailarinasOrden;
    }

    public void setLsBailarinasOrden(JList lsBailarinasOrden) {
        this.lsBailarinasOrden = lsBailarinasOrden;
    }

    public JList getLsSalonerosOrden() {
        return lsSalonerosOrden;
    }

    public void setLsSalonerosOrden(JList lsSalonerosOrden) {
        this.lsSalonerosOrden = lsSalonerosOrden;
    }

    public JRadioButton getRbConsumo() {
        return rbConsumo;
    }

    public void setRbConsumo(JRadioButton rbConsumo) {
        this.rbConsumo = rbConsumo;
    }

    public JRadioButton getRbCortesia() {
        return rbCortesia;
    }

    public void setRbCortesia(JRadioButton rbCortesia) {
        this.rbCortesia = rbCortesia;
    }

    public JRadioButton getRbFicha() {
        return rbFicha;
    }

    public void setRbFicha(JRadioButton rbFicha) {
        this.rbFicha = rbFicha;
    }

    public JLabel getjLabel2() {
        return jLabel2;
    }

    public void setjLabel2(JLabel jLabel2) {
        this.jLabel2 = jLabel2;
    }

    public JLabel getLblNumProducto() {
        return lblNumProducto;
    }

    public void setLblNumProducto(JLabel lblNumProducto) {
        this.lblNumProducto = lblNumProducto;
    }

    public UIPuntoVenta getUiPuntoVenta() {
        return uiPuntoVenta;
    }

    public void setUiPuntoVenta(UIPuntoVenta uiPuntoVenta) {
        this.uiPuntoVenta = uiPuntoVenta;
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        rbConsumo = new javax.swing.JRadioButton();
        rbFicha = new javax.swing.JRadioButton();
        rbCortesia = new javax.swing.JRadioButton();
        jLabel5 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        lsSalonerosOrden = new javax.swing.JList();
        jLabel6 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        lsBailarinasOrden = new javax.swing.JList();
        jPanel2 = new javax.swing.JPanel();
        lblNumProducto = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        btnAgregarOrden = new javax.swing.JButton();

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        rbConsumo.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(rbConsumo);
        rbConsumo.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 24)); // NOI18N
        rbConsumo.setSelected(true);
        rbConsumo.setText("Consumo");
        rbConsumo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbConsumoActionPerformed(evt);
            }
        });

        rbFicha.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(rbFicha);
        rbFicha.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 24));
        rbFicha.setText("Ficha");
        rbFicha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbFichaActionPerformed(evt);
            }
        });

        rbCortesia.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(rbCortesia);
        rbCortesia.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 24));
        rbCortesia.setText("Cortesia");
        rbCortesia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCortesiaActionPerformed(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel5.setText("Elegir Salonero:");

        lsSalonerosOrden.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
        lsSalonerosOrden.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 18));
        lsSalonerosOrden.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        lsSalonerosOrden.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lsSalonerosOrdenMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(lsSalonerosOrden);

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel6.setText("Elegir Bailarina:");
        jLabel6.setEnabled(false);

        lsBailarinasOrden.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
        lsBailarinasOrden.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 18));
        lsBailarinasOrden.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        lsBailarinasOrden.setEnabled(false);
        lsBailarinasOrden.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lsBailarinasOrdenMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(lsBailarinasOrden);

        jPanel2.setBackground(new java.awt.Color(0, 102, 102));

        lblNumProducto.setFont(new java.awt.Font("Microsoft JhengHei", 1, 18));
        lblNumProducto.setForeground(new java.awt.Color(255, 255, 255));
        lblNumProducto.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);

        jLabel2.setFont(new java.awt.Font("Microsoft JhengHei", 1, 18));
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("Orden");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblNumProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(85, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblNumProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnAgregarOrden.setBackground(new java.awt.Color(255, 255, 255));
        btnAgregarOrden.setFont(new java.awt.Font("MS Reference Sans Serif", 1, 18));
        btnAgregarOrden.setForeground(new java.awt.Color(0, 102, 0));
        btnAgregarOrden.setText("Agregar");
        btnAgregarOrden.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 153, 0), 2, true));
        btnAgregarOrden.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarOrdenActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(rbFicha)
                                .addGap(18, 18, 18)
                                .addComponent(rbConsumo)
                                .addGap(18, 18, 18)
                                .addComponent(rbCortesia))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(63, 63, 63)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addContainerGap(10, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnAgregarOrden, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 375, Short.MAX_VALUE)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(20, 20, 20))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbFicha)
                    .addComponent(rbConsumo)
                    .addComponent(rbCortesia))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
                .addComponent(btnAgregarOrden, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void lsSalonerosOrdenMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lsSalonerosOrdenMouseClicked
               // TODO add your handling code here:
}//GEN-LAST:event_lsSalonerosOrdenMouseClicked

    private void lsBailarinasOrdenMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lsBailarinasOrdenMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_lsBailarinasOrdenMouseClicked

    private void btnAgregarOrdenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarOrdenActionPerformed
      uiPuntoVenta.agregarOrden();
}//GEN-LAST:event_btnAgregarOrdenActionPerformed

    private void rbFichaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbFichaActionPerformed
       uiPuntoVenta.rbFichaSeleccionada();
    }//GEN-LAST:event_rbFichaActionPerformed

    private void rbConsumoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbConsumoActionPerformed
        uiPuntoVenta.rbConsumoSeleccionado();
    }//GEN-LAST:event_rbConsumoActionPerformed

    private void rbCortesiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCortesiaActionPerformed
       uiPuntoVenta.rbCortesiaSeleccionada();
    }//GEN-LAST:event_rbCortesiaActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FROrden().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAgregarOrden;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JLabel lblNumProducto;
    private javax.swing.JList lsBailarinasOrden;
    private javax.swing.JList lsSalonerosOrden;
    private javax.swing.JRadioButton rbConsumo;
    private javax.swing.JRadioButton rbCortesia;
    private javax.swing.JRadioButton rbFicha;
    // End of variables declaration//GEN-END:variables

}
